<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>cssLearn Demos</title>
	<style>
		.list>li{
			color: #fe7300;
			font-size: 16px;
		}
	</style>
</head>
<body>
	<h1>Demos</h1>
	<ul class="list"></ul>
	<script>
		window.onload = function(){
			const baseURL = 'http://fguizc.oschina.io/csslearn'
			let arr = [
				'checkbox',
				'flipclick'
			]

			let list = document.querySelector(".list")

			arr.map((item, index)=>{
				const tmp = document.createElement('li')
				tmp.innerHTML = item
				list.appendChild(tmp)
			})

			list.addEventListener('click', function(e){
				console.log('click')
				location.href = `${baseURL}/${e.target.innerHTML}`
			})
		}
	</script>
</body>
</html>